package com.nhjf.model.teachers;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.nhjf.model.BaseModel;
import com.nhjf.model.system.User;
@SuppressWarnings("serial")
@Entity
@Table(name = "reviewPaintingCollection")
public class ReviewPaintingCollection extends BaseModel{
	/**
     * 主键ID
     */
    @Id
    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "native")
    @Column(name = "id", unique = true)
    private Long id;
    /**
     * 作品id
     */
    @OneToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "paintingId")
    private  ReviewPainting reviewPaintingId;
    /**
     * 收藏人类型1老师，2学生
     */
    @Column(name = "collectionUserType")
    private Integer collectionUserType;
    /**
     * 收藏人userid
     */
    @OneToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "collectionUser")
    private User userId;
    /**
     * 收藏时间
     */
    @Column(name = "collectionTime")
    private Date collectionTime;
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	
	public ReviewPainting getReviewPaintingId() {
		return reviewPaintingId;
	}
	public void setReviewPaintingId(ReviewPainting reviewPaintingId) {
		this.reviewPaintingId = reviewPaintingId;
	}
	public Integer getCollectionUserType() {
		return collectionUserType;
	}
	public void setCollectionUserType(Integer collectionUserType) {
		this.collectionUserType = collectionUserType;
	}
	public User getUserId() {
		return userId;
	}
	public void setUserId(User userId) {
		this.userId = userId;
	}
	public Date getCollectionTime() {
		return collectionTime;
	}
	public void setCollectionTime(Date collectionTime) {
		this.collectionTime = collectionTime;
	}
    
    
}
